<!--src/main/resources/templates/reply/reply.html-->
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>评论信息</title>
    <link rel="stylesheet" type="text/css" th:href="@{/css/styles.css}">
</head>
<body>
<h2>评论信息</h2>

<a th:href="@{/reply/add}" class="btn-blue">新增评论</a>
<a th:href="@{/reply/search}" class="btn-blue">搜索评论</a>
<a th:href="@{/index}" class="btn-blue">回到首页</a>

<table>
    <thead>
    <tr>
        <th>评论编号</th>
        <th>评论内容</th>
        <th>评论时间</th>
        <th>评论文章编号</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody>
    <tr th:each="reply : ${replies}">
        <td th:text="${reply.id}"></td>
        <td th:text="${reply.content}"></td>
        <td th:text="${#temporals.format(reply.time, 'yyyy-MM-dd HH:mm:ss')}"></td>
        <td th:text="${reply.article_id}"></td>
        <td>
            <a th:href="@{'/reply/edit/' + ${reply.id}}" class="btn-gray">编辑</a>
            <a th:href="@{'/reply/delete/' + ${reply.id}}" class="btn-red">删除</a>
        </td>
    </tr>
    </tbody>
</table>
</body>
</html>
